﻿<%@ Page language="C#" MasterPageFile="~masterurl/default.master" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="/_controltemplates/InputFormSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="/_controltemplates/ButtonSection.ascx" %>
<%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>


<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<script type="text/javascript">
        function closeDialog() {
            SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.cancel, 'Cancelled clicked');
        }
        function returnOK(){
        	
        		var comments = document.getElementById("ctl00_PlaceHolderMain_ctl00_ctl00_txtComments").value;
        		var selectedValue = "";
				for(i=0;i<=2;i++)
				{
					var id = "ctl00_PlaceHolderMain_approveDescription_ctl00_ddlAprovalOptions_"+i;
					var data = document.getElementById(id);
					if(data.checked == true)
					{
						selectedValue=data.value;
						break;
					}
				}
				
			 var returnValue = selectedValue + "$" + comments;	
			 SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK,returnValue);     
			 return false;                              
		}
    </script>
		<table class="ms-propertysheet" border="0" width="100%" cellspacing="0" cellpadding="0">
			<wssuc:InputFormSection runat="server" ID="approveDescription"
		 	  Title="<%$Resources:wss,approve_approvalstatustitle%>"
				Description="<%$Resources:wss,approve_approvalstatusdesc%>" __Error="The WebPart could not be deserialized from the markup.">
				<Template_InputFormControls>
					<wssuc:InputFormControl runat="server"
						SmallIndent="true"
						>
						<Template_Control>
							<asp:RadioButtonList id="ddlAprovalOptions" CssClass="ms-authoringcontrols" Runat="server">
                                <asp:ListItem Text="<%$Resources:wss,approve_approved%>" Value="Approved" Selected="True"/>
                                <asp:ListItem Text="<%$Resources:wss,approve_rejected%>" Value="Denied" />
                                <asp:ListItem Text="<%$Resources:wss,approve_pending%>" Value="Pending" />
                            </asp:RadioButtonList>
						</Template_Control>
					</wssuc:InputFormControl>
				</Template_InputFormControls>
			</wssuc:InputFormSection>
			<wssuc:InputFormSection runat="server"
				Title="<%$Resources:wss,approve_commentstitle%>"
				Description="<%$Resources:wss,approve_commentsdesc%>" __Error="The WebPart could not be deserialized from the markup.">
				<Template_InputFormControls>
					<wssuc:InputFormControl runat="server">
						<Template_Control>
							<wssawc:InputFormTextBox title="<%$Resources:wss,approve_commentstooltip%>" class="ms-input" ID="txtComments" Runat="server" TextMode="MultiLine" Columns="40" Rows="5"/>
						</Template_Control>
					</wssuc:InputFormControl>
				</Template_InputFormControls>
			</wssuc:InputFormSection>
            <wssuc:ButtonSection runat="server" __Error="The WebPart could not be deserialized from the markup.">
				<Template_Buttons>
				<asp:Button UseSubmitBehavior="true" runat="server" class="ms-ButtonHeightWidth" Text="Ok" id="Button1" onClientClick="returnOK()" />
				</Template_Buttons>
			</wssuc:ButtonSection>
		</table>

</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
	
</asp:Content>
<asp:Content ID="PageTitle" ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
	<SharePoint:EncodedLiteral ID="EncodedLiteral1" runat="server" text="<%$Resources:wss,approve_pagetitle%>" EncodeMethod='HtmlEncode' __designer:Preview="Approve/Reject" __designer:Values="&lt;P N='Text' Bound='True' T='Resources:wss,approve_pagetitle' /&gt;&lt;P N='ID' ID='1' T='EncodedLiteral1' /&gt;&lt;P N='Page' ID='2' /&gt;&lt;P N='TemplateControl' R='2' /&gt;&lt;P N='AppRelativeTemplateSourceDirectory' R='-1' /&gt;"/>
</asp:Content>

